package entity;

/**
 * Created by Administrator on 2019/1/22.
 */
public class AccessToken {
    public AccessToken(String accessToken, String expireIn) {
        this.accessToken = accessToken;
        expireTime = System.currentTimeMillis()+Integer.parseInt(expireIn)*1000;
    }

    //判断yoken是否过期
    public boolean isExpired(){
        return System.currentTimeMillis()>expireTime;
    }

    private String accessToken;

    public String getAccessToken() {
        return accessToken;
    }

    public void setAccessToken(String accessToken) {
        this.accessToken = accessToken;
    }

    public Long getExpireTime() {
        return expireTime;
    }

    public void setExpireTime(Long expireTime) {
        this.expireTime = expireTime;
    }

    private Long expireTime;
}
